package patterns.transfer;

/**
 * Created by lenovo on 2016/12/12 0012.
 * 演示
 */
public class TransferObjectPatternDemo {
    public static void main(String[] args) {
        StudentBO studentBO = new StudentBO();

        //显示所有
        for (StudentVO sv : studentBO.getAllStudents()) {
            System.out.println(sv.toString());
        }

        //更新
        StudentVO s1 = studentBO.getAllStudents().get(0);
        s1.setName("hahaha");
        studentBO.updateStudent(s1);

        //获取数据
        studentBO.getStudent(1);
        System.out.println(studentBO.getStudent(1).toString());

    }
}
